#pragma once
#include "Core/Renderer/Texture.h"
#include <glad/glad.h>

namespace Origin
{
	class OpenGLTexture2D: public Texture2D
	{
	public:
		OpenGLTexture2D(const std::string& path);
		virtual ~OpenGLTexture2D();
		virtual uint32_t GetWidth() const override { return _width; };
		virtual uint32_t GetHeight() const override { return _height; };
		virtual void Bind(uint32_t slot = 0) const override;
		inline GLenum GetDataFormat(int& channel) const;
		inline GLenum GetInternalFormat(int& channel) const;
	private:
		std::string _path;
		uint32_t _width, _height;
		uint32_t _rendererID;
	};
}


